window.XMS = window.XMS || {};
window.XMS.Roles = window.Roles || {};

window.XMS.Roles.initialize = function( _roles )
{
	_roles.split(',').each(function(el){ this[el] = true; }.bind(this));
	this._roles = _roles;
}
window.XMS.Roles.toString = function( ) { return this._roles.replace(/,/,' '); }

document.addEvent('domready',function(){
	var _roles = $('xms_roles');
	if( !_roles ) return;
	window.XMS.Roles.initialize( _roles.get('text') );
});
